package org.ajc.gift.exception;

/*
    自己定义业务异常
    自定义异常怎么做?

 */
public class BusinessException extends RuntimeException{
    private Integer code;

    //根据自己的需求提供一些构造方法
    public BusinessException(String message){
        super(message);
    }

    public BusinessException(ResponseCode responseCode){
        super(responseCode.getMsg());
        this.code=responseCode.getCode();
    }
    public Integer getCode() {
        return code;
    }

}
